<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvCenter.ascx.cs" Inherits="Controls_AdvCenter" %>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
    
<td class="banner_02">

    <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1">
        <ItemStyle HorizontalAlign="Center" />
        <ItemTemplate>
            <a href='http:<%# Eval("Adv_Link") %>'>
                <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/images/Adv/"+Eval("Adv_Image") %>' border="0"  />
            </a>
        </ItemTemplate>
    </asp:DataList>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="Get_AdvertiseAsPaging"
        TypeName="FShop.BAL.Advertise_BAL">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="pageIndex" Type="Int32" />
                <asp:Parameter DefaultValue="2" Name="pageSize" Type="Int32" />
                <asp:Parameter  Name="sSortColumn" Type="String" />
                <asp:Parameter DefaultValue="*" Name="sFields" Type="String" />
                <asp:Parameter DefaultValue="Adv_Position=0" Name="sWhere" Type="String" />
                <asp:Parameter DefaultValue="" Name="sGroupBy" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
   <%-- <script runat="Server" type="text/C#">
        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        public static AjaxControlToolkit.Slide[] GetSlides()
        {

            AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[5];

            slides[0] = new AjaxControlToolkit.Slide("images/Adv1.jpg", "Blue Hills", "Go Blue");
            slides[1] = new AjaxControlToolkit.Slide("images/Adv2.jpg", "Sunset", "Setting sun");
            slides[2] = new AjaxControlToolkit.Slide("images/Adv3.jpg", "Winter", "Wintery...");
            slides[3] = new AjaxControlToolkit.Slide("images/banner_02.gif", "Water lillies", "Lillies in the water");
            slides[4] = new AjaxControlToolkit.Slide("images/banner_03.gif", "Sedona", "Portrait style picture");
            return (slides);
            //System.Data.DataTable tbl = FShop.BAL.Advertise_BAL.Get_AdvertiseAsPaging(1, 4, "Adv_ID DESC", "*", "", "");
            //if (tbl.Rows.Count == 0) return null;

            //AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[tbl.Rows.Count];

            //for (int i = 0; i < tbl.Rows.Count; i++)
            //{
            //    slides[0] = new AjaxControlToolkit.Slide("Images/Adv/" + tbl.Rows[i]["Adv_Image"].ToString(),tbl.Rows[i]["Adv_Title"].ToString(), tbl.Rows[i]["Adv_Links"].ToString());
            //}
            //return (slides);
        }
    </script>
    
    <a href="#" target="_self">   
        <asp:Image ID="imageAdvInCenter" runat="server"/>   
    </a>
    
    <ajaxToolkit:SlideShowExtender ID="SlideShowExtender1"
         AutoPlay="true" 
         Loop="true"          
         SlideShowServiceMethod="GetSlides" 
         TargetControlID="imageAdvInCenter" 
         runat="server">
    </ajaxToolkit:SlideShowExtender>--%>     
    
</td>
</tr>
</tbody>
</table>	
